           <template>
                   <!-- 生成班次计划 -->
                <div>
                          <!-- 标题栏 -->
                          <el-row class="add-title">
                              <el-col :span="24">

                              </el-col>
                          </el-row>
                          <el-row>
                            <el-col :span="24">
                                 <avue-form v-model="createForm" :option="createOption" class="yz-form"></avue-form>
                              <!-- <avue-form v-model="createForm" :option="createList2" class="yz-form"></avue-form> -->
                            </el-col>
                          </el-row>
                    </div>       
           </template>
        <script>
import qs from "qs";
import TableData from "../../components/common/tableData";
import "../../assets/js/mouse.js";
import popDilog from  "../../components/common/popDilog";
import banciSubTmpe from "../../views/banciSubTmpe/banciSubTmpe";
import banciCreatePlan from "../../views/banciSubTmpe/banciCreatePlan";

const DIC={
  openType:[
    {
      label:"当班",
      value:"1"
    },
    {
      label:"全部",
      value:"2"
    },
    {
      label:"按日期",
      value:"3"
    },
  ],
  tongBuSetting:[
    {
      label:"同步",
      value:"1"
    },
  ],
  longS:[
    {
      label:"",
      value:"1"
    }
  ],
  TongS:[
    {
      label:"",
      value:"1"
    }
  ],
  copyCheckList1:[
    {
      label:"座位",
      value:"seat"
    },
    {
      label:"票价",
      value:"price"
    },
    {
      label:"车牌",
      value:"vecho"
    },
    {
      label:"营运单位",
      value:"comp"
    },
    {
      label:"班车车型",
      value:"carStyle"
    },
    {
      label:"班次状态",
      value:"classState"
    },
    {
      label:"班次类型",
      value:"classStyle"
    },
    {
      label:"预售天数",
      value:"sellDay"
    },
    {
      label:"检票门",
      value:"checkDoor"
    },
    
  ],
  copyCheckList2:[
    {
      label:"发车卡位",
      value:"seat"
    },
    {
      label:"是否配套",
      value:"suitable"
    },
    {
      label:"是否启用",
      value:"startable"
    },
    {
      label:"是否加班",
      value:"isAdd"
    },
    {
      label:"允许远程售票",
      value:"sellFar"
    },
    {
      label:"终点站",
      value:"end"
    },
    {
      label:"打印班次时间",
      value:"printTime"
    },
    {
      label:"打印班次号",
      value:"printID"
    },
    {
      label:"打印座位号",
      value:"printSeat"
    },
  ],
  createList1:[
    {
      label:"覆盖已生成的座位表计划",
      value:"recoverTable"
    }
  ],
  createList2:[
    {
      label:"更新已生成的座位表计划",
      value:"updateTable"
    }
  ],
  createList3:[
    {
      label:"生成票计划表",
      value:"createPlan"
    }
  ],
  createList4:[
    {
      label:"覆盖已生成的票价计划",
      value:"recoverPlan"
    }
  ],
};
export default {
  data: function() {
    return {
      activeTag: "2-1",
      road: "",
      title:'复制班次',
      toPlace: "",
      carNum: "",
      currentRow:"",
      isShow:false,
      isShowPlan:false,
      width:"1000px",
      height:"680px",
      width2:'450px',
      height2:'310px',
      banTable: [
        {
          page: {
            pageSizes: [10],
            total: 2,
            currentPage: 1,
            pageSize: 10
          },
          data: [],
          option: {
            page: true,
            stripe: true,
            menu: false,
            expand:true,
            highlightCurrentRow:true,
            align: "center",
            menuAlign: "center",
            column: []
          }
        }
      ],
      getTablePage: {
        page: 1,
        rows: 30
      },
      delID: "1",
      modList: {
        seat_define_str: "test",
        "busDefine.seat_layout": "test2",
        "busDefine.line_id": "test3",
        lineName: "test4",
        "busDefine.bus_id": "test5",
        from_busdid: "test6",
        "busDefine.bus_time": "test7",
        "busDefine.all_seat": "test8",
        "busDefine.customer_id": "test9",
        "busDefine.vehi_type_id": "test10",
        "busDefine.seat_type": "test11",
        "busDefine.status_id": "test12",
        "busDefine.start_date": "test13",
        "busDefine.end_date": "test14",
        "busDefine.presell_day": "test15"
      },
      pageSize: 1,
      pageNum: 1,
      totalPage: 0,
      roadList:[],
      endList:[],
      checkRoadID:"",
      checkEndID:"",
      addWin:false,
      modTitle:"添加班次",
      addRoad:"",
      addClassDate:"",
      addClassDateTo:"",
      addClassNum:"",
      addCarTime:"",
      addSeatCount:"",
      addCarId:"",
      addComp:"",
      addCarType:"",
      addCompII:"",
      seatTypeList:[],
      classTypeList:[],
      carList:[],
      beforeSell:"",
      checkDoor:"",
      endStation:"",
      startPlace:"",
      beiZhu:"",
      addFunTab:"msg",
      modCurrentRow:"",
      peiKeMsg:[],
      peiKeList:[],
      addCompList:[],
      peiKeSta:"",
      ClassType:"",
      addSeatType:"",
      seatShow:false,
      checkStart:false,
      checkPei:false,
      checkAddClass:false,
      checkAllow:false,
      checkCarTime:false,
      checkPintSeat:false,
      checkClassNum:false,
      seatDetailList:{    
        data:[],
        option:{
          menu:false,
          column:[
            {
              label:"座号",
              prop:"seat_id"
            },
            {
              label:"状态",
              prop:"status_cn"
            },
            {
              label:"工号",
              prop:"order_no"
            },
            {
              label:"操作时间",
              prop:"check_time"
            },
            {
              label:"票号",
              prop:"billno"
            },
            {
              label:"票型",
              prop:"tks_type"
            },
            {
              label:"购票渠道",
              prop:"test"
            },
            {
              label:"订单时间",
              prop:"order_time"
            },
          ]
        }
      },
      currentMsg:{},
      rightCopyAll:false,
      copyForm:{},
      copyListOption:{
          column:[
            {
              label:"班次日期",
              prop:"BanCidate",
              type:"daterange",
              span:10
            },
            {
              label:"班次号",
              prop:"BCNum",
              span:5
            },
          ]
      },
      copyList:{
        data:[],
        option:{
          menu:false,
          index:true,
          selection:true,
          page:false,
          column:[
            {
              label:"班次号",
              prop:"bus_id"
            },
            {
              label:"班次日期",
              prop:"bus_date"
            },
            {
              label:"发班时间",
              prop:"bus_time"
            },
            {
              label:"班次类型",
              prop:"type"
            },
            {
              label:"状态",
              prop:"status_id"
            },
            {
              label:"总座数",
              prop:"all_seat"
            },
          ]
        }
      },
      copyCheck:{},
      copyCheckListOption:{
        dicData:DIC,
        column:[
          {
            label: "",
            prop: "ccl1",
            span: 24,
            type: "checkbox",
            dicData: 'copyCheckList1',
          },
          {
            label: "",
            prop: "ccl2",
            span: 24,
            type: "checkbox",
            dicData: 'copyCheckList2',
          },
        ]
      },
      piCopy:false,
      piCopyForm:{},
      piOption:{
        column:[
          {
            label:"班次号",
            prop:"startNum",
            span:15,
            tip:"注:往后递增"
          },
          {
            label:"复制数量",
            prop:"copyCount",
            span:15
          },
          {
            label:"时间分隔",
            prop:"time",
            span:15
          },
        ]
      },
      createWin:false,
      createForm:{},
      createOption:{
        dicData:DIC,
        column:[
          {
            label:"",
            span:24,
            type:"checkbox",
            prop:"recoverTable",
            dicData: 'createList1'
          },
          {
            label:"",
            span:24,
            type:"checkbox",
            prop:"update",
            dicData: 'createList2'
          },
          {
            label:"",
            span:24,
            type:"checkbox",
            prop:"createPlan",
            dicData: 'createList3'
          },
          {
            label:"",
            span:24,
            type:"checkbox",
            prop:"recoverPlan",
            dicData: 'createList4'
          },
        ]
      }
    };
  },
  methods: {
    banTablePage(val){
      this.banTable[0].page.currentPage=val;
      this.getBanList();
    },
     changeVisibles(){
      this.isShow = !this.isShow;
     },
     isShowPlans(){
       this.isShowPlan = !this.isShowPlan;
     },
        getBanList()  {
      this.banTable[0].data=[];
      this.postRequest("/sch/bus/define/list",{
        rows:"10",
        page:this.banTable[0].page.currentPage
      })
        .then(data => {
          console.log(data);
          this.banTable[0].page.total = data.data.totalRow;
          this.banTable[0].page.currentPage = data.data.pageNumber;
          for (var d of data.data.list) {
            this.banTable[0].data.push({
              id:d.id,
              bus_time:d.bus_time,
              line_name: d.line_name,
              bus_id: d.bus_id,
              bus_date: d.bus_date,
              type: d.type,
              customer_name: d.customer_name,
              all_seat: d.all_seat,
              can_sale_count: d.can_sale_count,
              salecount: d.salecount,
              checkdoor: d.checkdoor,
              end_seat: d.end_seat,
              kawei: d.kawei,
              seat_type: d.seat_type,
            });
          }
        });
    },
    refreshTable() {
      (this.banTable[0].data = []), this.getBanList();
    },
    add() {
      // this.addWin=true;
      this.$http
        .post("/sch/bus/define/add")
        .then(data => {
          this.$message.error(data.data[1]);
        });
    },
    del() {
      this.$http
        .post(
          "/sch/bus/define/del",
          qs.stringify({
            id:this.currentRow
          })
        )
        .then(data => {
          if (data.data[0] == 0) {
            this.$message({
              message: data.data[1],
              type: "success"
            });
          } else {
            this.$message.error(data.data[1]);
          }
        });
    },
    deleteOverDate() {
      this.$http
        .post(
          "/sch/bus/define/price/delOutdates",qs.stringify({
            bus_define_id:this.currentRow
          })
        )
        .then(data => {
          this.$message(data.data[1]);
          this.refreshTable();
        });
    },
    mod() {
      this.$http
        .post(
          "/sch/bus/define/update",
          qs.stringify(this.modList)
        )
        .then(data => {
          if (data.data[0] == 0) {
            this.$message({
              message: data.data[1],
              type: "success"
            });
          } else {
            this.$message.error(data.data[1]);
          }
        });
    },
    tableCreate() {
      this.banTable[0].option.column.push(
        {
          label: "线路",
          prop: "line_name"
        },
        {
          label: "班次号",
          prop: ""
        },
        {
          label: "时间",
          prop: "bus_date"
        },
        {
          label: "类型",
          prop: "type"
        },
        {
          label: "状态",
          prop: "customer_name"
        },
        {
          label: "总座位",
          prop: "all_seat"
        },
        {
          label: "可售",
          prop: "can_sale_count"
        },
        {
          label: "计划车牌",
          prop: "bus_id"
        },
        {
          label: "共售",
          prop: "salecount"
        },
        {
          label: "检票口",
          prop: "checkdoor"
        },
        {
          label: "余座",
          prop: "end_seat"
        },
        {
          label: "卡位",
          prop: "kawei"
        },
        {
          label: "座位类型",
          prop: "seat_type"
        },
        {
          label: "营运单位",
          prop: "state"
        }
      );
    },
    reset() {
      this.road="",
      this.carNum="",
      this.getBanList();
    },
    check() {
      var that = this;
      this.banTable[0].data=[];
      this.$http
        .post(
          "/sch/bus/define/list",
          JSON.stringify({
            filterRules: [
              { field: "line_code", op: "eq", value: that.checkRoadID },
              { field: "bus_id", op: "eq", value: that.carNum }
            ],
            page: 1,
            rows: 30,
            sort: 'line_code',
            order: 'asc',
          })
        )
        .then(data => {
          // console.log(data);
          this.pageSize = data.data.pageSize;
          this.pageNum = data.data.pageNumber;
          this.totalPage = data.data.totalPage;
          for (var d of data.data.list) {
            this.banTable[0].data.push({
              line_name: d.line_name,
              bus_id: d.bus_id,
              bus_date: d.bus_date,
              type: d.type,
              customer_name: d.customer_name,
              all_seat: d.all_seat,
              can_sale_count: d.can_sale_count,
              bus_id: d.bus_id,
              salecount: d.salecount,
              checkdoor: d.checkdoor,
              end_seat: d.end_seat,
              kawei: d.kawei,
              seat_type: d.seat_type,
              customer_name: d.customer_name
            });

          }
        });
    },
    rowChange(val){
      console.log(val);
     this.currentRow=val.id;
      this.currentMsg.line_name=val.line_name;
      this.currentMsg.bus_id=val.bus_id;
      this.currentMsg.bus_time=val.bus_time;
      this.currentMsg.bus_date=val.bus_date;
      this.currentMsg.end_seat=val.end_seat;
      this.currentMsg.status_id=val.status_id;
      this.currentMsg.vehi_no=val.vehi_no;
      this.currentMsg.checkdoor=val.checkdoor;
      this.currentMsg.kawei=val.kawei;
      this.$http.get("/sch/bus/plan/getViaStation?bus_plan_id="+val.id).then(data=>{
        this.peiKeMsg=[];
        for(var item of data.data){
          this.peiKeMsg.push({
            idx:item.idx,
            org_name:item.org_name,
            bus_id:item.bus_id,
            bus_time:item.bus_time
          });
        }
      })
    },
    createPlan(){
      this.$http.post("/sch/bus/define/makeplan?overrideSeatLayout=on&updateExistsBusPlan=on&makePricePlan=on&updateExistsPricePlan=on").then(data=>{
         if (data.data[0] == 0) {
            this.$message({
              message: data.data[1],
              type: "success"
            });
          } else {
            this.$message.error(data.data[1]);
          }
      });
    },
    loadRoad(){
      this.$http.post("/sch/data/line/listWithSpell").then(data=>{
        console.log(data);
        for(var item of data.data){
          this.roadList.push({
            value:item.name,
            id:item.id
          });
        }
      });
    },
    loadEnd(){
      this.$http.post("/sch/data/station/listWithSpell").then(data=>{
        for(var item of data.data){
          this.endList.push({
            value:item.name,
            id:item.id
          });
        }
      });
    },
    querySearch(queryString, cb) {
        var roadlist = this.roadList;
        var results = queryString ? roadlist.filter(this.createFilter(queryString)) : roadlist;
        // 调用 callback 返回建议列表的数据
        cb(results);
    },
    createFilter(queryString) {
      return (roadlist) => {
        return (roadlist.value);
      }
    },
    querySearchEnd(queryString, cb) {
        var endlist = this.endList;
        var results = queryString ? endlist.filter(this.createFilter(queryString)) : endlist;
        // 调用 callback 返回建议列表的数据
        cb(results);
    },
    redClass() {
      this.addWin = false;
      this.addRoad="";
      this.addClassNum="";
      this.addCarTime="";
      this.addSeatCount="";
      this.addCarId="";
      this.startPlace="";
      this.addFunTab="msg"
    },
    getCarList(){
      this.$http.post("/sch/const/bus_vehicle_type/listWithSpell").then(data=>{
        for(var item of data.data){
          this.carList.push({
            value:item.id,
            label:item.name
          });
        }
      })
    },
    TicAdd(){
      this.$http.post("/sch/bus/plan/price/detail?_=1535273667272").then(data=>{
        console.log(data);
      });
    },
    TicDel(){
      if(this.currentRow!=""){
        this.$http.get("/sch/bus/plan/price/del?id="+this.modCurrentRow).then(data=>{
            if(data.data[0]=="0"){
              this.$message({
              message: data.data[1],
              type: 'success'
              });
              this.modCurrentRow="";
            }else{
              this.$message.error(data.data[1]);
            }
        })
      }else{
        this.$message.error("请选择一条记录");
      }
    },
     TicUpdate(){
      this.$http.get("/sch/bus/plan/price/copyToSameLine?bus_plan_id="+this.currentRow+"&to_all_days=false&keep_status=1").then(data=>{
        if(data.data[0]=="0"){
              this.$message({
              message: data.data[1],
              type: 'success'
              });
              this.modCurrentRow="";
            }else{
              this.$message.error("更新失败！请检查");
            }
      });
    },
    TicTongbu(){
      this.$http.get("/sch/bus/plan/copyViaStationSyncConfig?bus_plan_id="+this.currentRow+"&all_days=0").then(data=>{
        if(data.data[0]=="0"){
              this.$message({
              message: data.data[1],
              type: 'success'
              });
              this.modCurrentRow="";
            }else{
              this.$message.error("更新失败！请检查");
            }
      })
    },
    addClass() {
      this.addWin = true;
      this.modTitle="添加班次"
      this.getSeatTypeList();
      this.getClassTypeList();
      this.getAddCompList();
      this.getChooseItem();
      this.getModList();
      this.getCarList();
    },
    saveClass() {
      this.$http
        .post(
          "/sch/bus/plan/add",
          qs.stringify({
            "busPlan.seat_layout":this.addSeatCount,
            "busPlan.id":this.addClassNum,
            new_bus_date_start:this.addClassDate,
            new_bus_date_end:this.addClassDateTo,
            "busPlan.line_id":this.addClassNum,
            lineName:this.addRoad,
            "busPlan.bus_id":this.addClassNum,
            "busPlan.bus_time":this.addCarTime,
            "busPlan.all_seat":this.addSeatCount,
            "busPlan.type":this.addComp,
            "busPlan.seat_type":this.addSeatType,
            "busPlan.status_id":this.addClassNum,
            "busPlan.presell_day":this.beforeSell,
          })
        )
        .then(data => {
          // console.log(data);
          if (data.data[0] == 0) {
            this.$message({
              message: data.data[1],
              type: "success"
            });
            this.getTicketList();
          } else {
            this.$message.error("信息有误或缺失请检查!");
          }
        });
    },
    deleteClass() {
      this.$http
        .post("/sch/bus/plan/price/del?id="+this.currentRow)
        .then(data => {
          console.log(data);
          if (data.data[0] == -1) {
            this.$message.error("删除失败！");
          } else {
            this.$message({
              message: data.data[1],
              type: "success"
            });
          }
        });
    },
    showUpdateWin(){
      this.modTitle="修改班次";
      if(this.currentRow==""){
        this.$message.error('请选择一条记录');
      }else{
        this.addWin=true;
        this.addRoad=this.currentMsg.line_name;
        this.addClassNum=this.currentMsg.status_id;
        this.addCarTime=this.currentMsg.bus_date;
        this.addSeatCount=this.currentMsg.end_seat;
        this.addCarId=this.currentMsg.vehi_no;
        this.startPlace=this.currentMsg.kawei;
      }
    },
        getClassTypeList(){
      this.$http.post("/sch/data/common/busstatus").then(data=>{
        for(var item of data.data){
          this.classTypeList.push({
            value:item.key,
            label:item.value
          });
        }
      });
    },
    getAddCompList(){
      this.$http.post("/sch/data/common/bustype").then(data=>{
        for(var item of data.data){
          this.addCompList.push({
            value:item.value,
            label:item.key
          });
        }
      });
    },
    getChooseItem(){
      this.$http.post("/common/constant/getYesOrNo").then(data=>{
        for(var item of data.data){
          this.chooseItem.push({
            value:item.value,
            label:item.key
          });
        }
      })
    },
    getModList(){
      this.$http.post("/sch/bus/plan/price/list").then(data=>{
        for(var item of data.data.list){
          this.modList.data.push({
            st_name:item.st_name,
            type_1:item.type_1,
            type_2:item.type_2,
            max_price:item.max_price,
            surcharges:item.surcharges
          });
        }
      })
    },
    TicTableMsg(){
      this.modTitle="修改班次";
      if(this.currentRow==""){
        this.$message.error('请选择一条记录');
      }else{
        this.addWin=true;
        this.addRoad=this.currentMsg.line_name;
        this.addClassNum=this.currentMsg.status_id;
        this.addCarTime=this.currentMsg.bus_date;
        this.addSeatCount=this.currentMsg.end_seat;
        this.addCarId=this.currentMsg.vehi_no;
        this.startPlace=this.currentMsg.kawei;
        this.addFunTab="price";
      }
    },
    peiKeTableMsg(){
      this.modTitle="修改班次";
      if(this.currentRow==""){
        this.$message.error('请选择一条记录');
      }else{
        this.addWin=true;
        this.addRoad=this.currentMsg.line_name;
        this.addClassNum=this.currentMsg.status_id;
        this.addCarTime=this.currentMsg.bus_date;
        this.addSeatCount=this.currentMsg.end_seat;
        this.addCarId=this.currentMsg.vehi_no;
        this.startPlace=this.currentMsg.kawei;
        this.addFunTab="seat";
      }
    },
    copyClass(){
      this.modTitle="复制班次";
      if(this.currentRow==""){
        this.$message.error('请选择一条记录');
      }else{
        this.addWin=true;
        this.addRoad=this.currentMsg.line_name;
        this.addClassNum=this.currentMsg.status_id;
        this.addCarTime=this.currentMsg.bus_date;
        this.addSeatCount=this.currentMsg.end_seat;
        this.addCarId=this.currentMsg.vehi_no;
        this.startPlace=this.currentMsg.kawei;
      }
    },
    getSeatTypeList(){
      this.$http.post("/sch/data/common/busseattype").then(data=>{
        for(var item of data.data){
          this.seatTypeList.push({
            value:item.value,
            label:item.key
          });
        }
      })
    },
     toPlaceII(){
      if(this.toPlace==""){
        this.checkEndID="";
      }else{
        for(var item of this.endList){
          if(this.toPlace==item.value){
            this.checkEndID=item.id
          }
        }
      }
    },
     getModList(){
      this.$http.post("/sch/bus/plan/price/list").then(data=>{
        for(var item of data.data.list){
          this.modList.data.push({
            st_name:item.st_name,
            type_1:item.type_1,
            type_2:item.type_2,
            max_price:item.max_price,
            surcharges:item.surcharges
          });
        }
      })
    },
    getCarList(){
      this.$http.post("/sch/const/bus_vehicle_type/listWithSpell").then(data=>{
        for(var item of data.data){
          this.carList.push({
            value:item.id,
            label:item.name
          });
        }
      })
    },
    getSeatDetailList(){
      var that=this;
      this.seatDetailList=[];
      this.$http.post("/sch/bus/plan/seat/list",qs.stringify({bus_plan_id:this.currentRow})).then(data=>{
        for(var item of data.data){
          that.seatDetailList.data.push({
            seat_id:item.seat_id,
            status_cn:item.status_cn,
            order_no:item.order_no,
            check_time:item.check_time,
            billno:item.billno,
            tks_type:item.tks_type,
            order_time:item.order_time
          });
        }
      });
      console.log(that.seatTypeList)
    },
    redSeat(){
      this.seatShow=false;
    },
    showSeatDetail(){
      this.seatShow=true;
      this.getSeatDetailList();
    },
    tablerowChange(){},
    modrowChange(val){
      this.modCurrentRow=val.id;
    },
    openRightCopy(){
      this.rightCopyAll=true;
    },
    closeCopy(){
      this.rightCopyAll=false;
    },
    docopyCheck(){
      this.getcopyList();
    },
    getcopyList(){
      this.postRequest("/sch/bus/plan/copylist",{
        bus_plan_id:this.currentRow,
        be_busdate:this.dateToString(this.copyForm.BanCidate[0]),
        ed_busdate:this.dateToString(this.copyForm.BanCidate[1]),
        line_id:this.currentMsg.line_id
      }).then(data=>{
        this.copyList.data=data.data.list;
      })
    },
    closeCopyDetail(){
      this.rightCopyAll=false;
    },
    rCopyDetail(){
      this.postRequest("/sch/bus/plan/doCopybusInfo",{
        bus_plan_id:this.currentRow,
        // copy_seat:this.copyCheck.copyCheckList1[0]?"on":"off",
        // copy_price:this.copyCheck.copyCheckList1[1]?"on":"off",
        // copy_vehi_no:this.copyCheck.copyCheckList1[2]?"on":"off",
        // copy_customer:this.copyCheck.copyCheckList1[3]?"on":"off",
        // copy_vehi_type:this.copyCheck.copyCheckList1[4]?"on":"off",
        // copy_status:this.copyCheck.copyCheckList1[5]?"on":"off",
        // copy_type:this.copyCheck.copyCheckList1[6]?"on":"off",
        // copy_presell:this.copyCheck.copyCheckList1[7]?"on":"off",
        // copy_checkdoor:this.copyCheck.copyCheckList1[8]?"on":"off",
        // copy_kawei:this.copyCheck.copyCheckList2[0]?"on":"off",
        // copy_is_mix:this.copyCheck.copyCheckList2[1]?"on":"off",
        // copy_is_valid:this.copyCheck.copyCheckList2[2]?"on":"off",
        // copy_is_ot:this.copyCheck.copyCheckList2[3]?"on":"off",
        // copy_is_remote:this.copyCheck.copyCheckList2[4]?"on":"off",
        // copy_end_station:this.copyCheck.copyCheckList2[5]?"on":"off",
        // copy_prn_time:this.copyCheck.copyCheckList2[6]?"on":"off",
        // copy_prn_busid:this.copyCheck.copyCheckList2[7]?"on":"off",
        // copy_prn_seat:this.copyCheck.copyCheckList2[8]?"on":"off",
        bus_plan_ids:this.currentRow
      }).then(data=>{
        if(data.data[0]==0){
          this.$message({
            message: data.data[1],
            type: 'success'
          });
          this.closeCopyDetail();
        }else{
          this.$message.error(data.data[1]);
        }
      })
    },
    doPiCopy(){
      this.piCopyForm.startNum;
      this.postRequest("/sch/bus/define/nextbusid",{
        be_bus_id:this.piCopyForm.startNum
      }).then(data=>{
        if(data.data[0]==0){
            this.$message({
            showClose: true,
            message: '复制成功',
            type: 'success'
          });
        }else{
          this.$message.error('复制失败!');
        }
      })
    },
    doCreatePlan(){
      this.postRequest("/sch/bus/define/makeplan",{
        overrideSeatLayout:this.createForm.recoverTable[0]?"on":"off",
        updateExistsBusPlan	:this.createForm.update[0]?"on":"off",
        makePricePlan:this.createForm.createPlan[0]?"on":"off",
        updateExistsPricePlan:this.createForm.recoverPlan[0]?"on":"off",
      }).then(data=>{
        if(data.data[0]==0){
              this.$message({
              showClose: true,
              message: data.data[1],
              type: 'success'
            });
          }else{
          this.$message.error('生成失败!');
          }
      });
    }
  },
  computed: {},
  components: { TableData,popDilog,banciSubTmpe,banciCreatePlan },
  watch: {
    road(){
      if(this.road==""){
        this.checkRoadID="";
      }else{
        for(var item of this.roadList){
          if(this.road==item.value){
            this.checkRoadID=item.id
          }
        }
      }
    },
   
  },
  created(){
    this.check();
  },
  mounted() {
    console.log("banCiSetting");
    this.$emit("sendActive", this.activeTag);
    this.tableCreate();
    this.getBanList();
    this.loadRoad();
    this.loadEnd();
    this.$http
      .get(
        "/sch/bus/plan/getViaStation?bus_plan_id=1635464"
      )
      .then(data => {
        for (var item of data.data) {
          this.peiKeList.push({ label: item.org_name });
        }
    });
    // 二级右键窗口
    $(".rightTwo,.right-menuII").hover(function(){
      $(".right-menuII").show();
    },function(){
      $(".right-menuII").hide();
    });
    // 三级右键窗口
    $(".rightThree,.right-menuIII,.right-menuIII-I,.right-menuIII-II").hover(function(){
      $(".right-menuIII").show();
    },function(){
      $(".right-menuIII").hide();
    });
    // 3-1级右键窗口
    $(".right-menuIII1,.right-menuIII-I").hover(function(){
      $(".right-menuIII-I").show();
    },function(){
      $(".right-menuIII-I").hide();
    });
    // 3-2级右键窗口
    $(".right-menuIII2,.right-menuIII-II").hover(function(){
      $(".right-menuIII-II").show();
    },function(){
      $(".right-menuIII-II").hide();
    });
    // 四级右键窗口
    $(".rightFour,.right-menuIV,.right-menuIV-I,.right-menuIV-II").hover(function(){
      $(".right-menuIV").show();
    },function(){
      $(".right-menuIV").hide();
    });
    // 4-1级右键窗口
    $(".right-menuIV1,.right-menuIV-I").hover(function(){
      $(".right-menuIV-I").show();
    },function(){
      $(".right-menuIV-I").hide();
    });
    // 4-2级右键窗口
    $(".right-menuIV2,.right-menuIV-II").hover(function(){
      $(".right-menuIV-II").show();
    },function(){
      $(".right-menuIV-II").hide();
    });
  }
};
 </script>
        <style scoped>
             @import "../../assets/css/service/banCiPlan.css";
        </style>
        